home *** CD-ROM | disk | FTP | other *** search
-
-
- CHGPATH (Change Directory) Version 1.0 (4/87)
- Command
-
- Copyright (C) 1987 by Scott Mason, except where noted in the
- source code, All Rights Reserved.
-
- Permission is hereby granted for use by non-profit entities only.
- Distribution of this file, CHGPATH.EXE, and/or CHGPATH.C in any form
- for a fee is prohibited.
-
- This file must accompany CHGPATH.EXE to where ever it goes.
-
- Written by Scott Mason
- 4050 Jay Em Circle
- Ellicott City, MD 21043
-
- ------------------------------------------------------------------
- Purpose: Allows you the make permanent changes to the PATH
- environment string from the DOS command line without
- having to retype the entire PATH command string.
-
- Format: CHGPATH +[drive][path]
- CHGPATH -[drive][path]
-
- Where: + is to add the string that follows it to
- the end of the PATH environment string.
-
- - is to remove the string that follows it
- from the PATH environment string.
-
- [drive] is a valid DOS drive letter (i.e. C:)
-
- [path] is a valid DOS directory path (i.e. \DOS)
-
-
-
- Remarks: All additions to the PATH string are appended to the end
- of the current PATH string. If no PATH environment string is
- found, one is created with the path the user specified as its
- only path. If no path environment string exists and an attempt
- is made to remove a path, the message "No path is set ..." will
- be displayed.
-
- There is no validation of the drive or paths the user
- includes on the command line. And no length check is made
- on the resulting PATH string.
-
- The new PATH setting is displayed and can be redirected.
-
- Written using the DeSmet C88 C compiler package, v2.51
- Acknowledgement and graditude is hereby given to:
-
- John M Sellens, who wrote the getpath & parse_path
- functions, and
- Dan Lewis, who wrote the execute_string (and
- subsequent) functions.
-
-
- Any comments and/or suggestions are welcome. I visit two
- BBSs fairly often. They are:
-
- Tom Vervacke's Baltimore-Washington BBS
- (301) 381-6441
-
- Robert Blacher's Computer Connections BBS
- (202) 547-7621
-
-
- Future Improvements:
-
- Allowing the user to specify where in the PATH environement
- string to add a new path.
-
-
- Examples:
-
- C:\>CHGPATH +D:\WP >NUL
-
- Will add the path D:\WP to the end of the current PATH
- environement string. If the PATH environment string before
- the command was:
-
- C:;C:\;C:\DOS;C:\UTILS
-
- then it will be
-
- C:;C:\;C:\DOS;C:\UTILS;D:\WP
-
- after the CHGPATH command is executed.
-
- Because ">NUL" is also on the command line, the new
- PATH setting is not displayed.
-
-
- C:\>CHGPATH -d:\reflex
-
- Will remove the path D:\REFLEX from the current PATH
- environement string. If the PATH environment string before
- the command was:
-
- C:;C:\;C:\DOS;C:\UTILS;D:\REFLEX;D:\WP
-
- then it will be
-
- C:;C:\;C:\DOS;C:\UTILS;D:\WP
-
- after the CHGPATH command is executed. The new PATH
- setting will be displayed.
-
-
-
-